/* 
 * File:   OpenDatabase.cpp
 * Author: vikrantsingh
 * 
 * Created on 2 November, 2013, 3:50 PM
 */

#include "OpenDatabase.h"

#include "../BufferManager/BufferManager.h"

OpenDatabase::OpenDatabase() {
}

OpenDatabase::OpenDatabase(const OpenDatabase& orig) {
}

OpenDatabase::~OpenDatabase() {
}
STATUS_CODE OpenDatabase::run(QueryStructures *queryStruct){
    
        
    BufferManager *bm = BufferManager::getInstance();
    if(bm->isDBOpen == true){
        bm->closeDB();        
    }    
    return bm->useDB(queryStruct->databaseName);
}
